import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./routers";
import "@/assets/css/base.css";

//引入全部的icon
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
//凡是以服务方式运行的组件样式必须手动导入样式，例如loading.service和message
import "element-plus/theme-chalk/el-loading.css";
import "element-plus/theme-chalk/el-message.css";
import "animate.css";
import "@/assets/js/iconfont.js";
import piniaPluginPersist from "pinia-plugin-persist";
import "@/assets/css/root.css";

const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersist);
//注册全部的icon
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component);
}
app.use(pinia);
app.use(router);

app.mount("#app");
